import {BasicColumn} from '/@/components/Table';
import {FormSchema} from '/@/components/Table';
import { rules} from '/@/utils/helper/validator';
import { render } from '/@/utils/common/renderUtils';
//列表数据
export const columns: BasicColumn[] = [
  {
    title: '所属渠道',
    align: "center",
    dataIndex: 'channelCode_dictText'
  },
  {
    title: '单位名称',
    align: "center",
    dataIndex: 'companyName'
  },
  {
    title: '单位简称',
    align: "center",
    dataIndex: 'shortName'
  },
  {
    title: '单位类型',
    align: "center",
    dataIndex: 'companyType_dictText'
  },
  {
    title: '行业类型',
    align: "center",
    dataIndex: 'industryType_dictText'
  },
  {
    title: '社会信用代码',
    align: "center",
    dataIndex: 'creditCode'
  },
  {
    title: '地区',
    align: "center",
    dataIndex: 'district',
  },
  {
    title: '注册资本',
    align: "center",
    dataIndex: 'registerCapital'
  },
  {
    title: '成立时间',
    align: "center",
    dataIndex: 'establishDate',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text);
    },
  },
  {
    title: '开始日期',
    align: "center",
    dataIndex: 'startTerm',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text);
    },
  },
  {
    title: '结束日期',
    align: "center",
    dataIndex: 'endTerm',
    customRender:({text}) =>{
      return !text?"":(text.length>10?text.substr(0,10):text);
    },
  },
  {
    title: '登记机关',
    align: "center",
    dataIndex: 'registrationAuthority'
  },
  {
    title: '经营地址',
    align: "center",
    dataIndex: 'address'
  },
  {
    title: '经营范围',
    align: "center",
    dataIndex: 'businessScope'
  },
  {
    title: '主营业务',
    align: "center",
    dataIndex: 'businessExpertise'
  },
  {
    title: '认证状态',
    align: "center",
    dataIndex: 'status_dictText'
  },
  {
    title: '移动用户',
    align: "center",
    dataIndex: 'appUserId'
  },
];

// 高级查询数据
export const superQuerySchema = {
  channelCode: {title: '所属渠道',order: 0,view: 'list', type: 'string',dictTable: "base_sale_channel", dictCode: 'channel_code', dictText: 'channel_name',},
  companyName: {title: '单位名称',order: 1,view: 'text', type: 'string',},
  shortName: {title: '单位简称',order: 2,view: 'text', type: 'string',},
  companyType: {title: '单位类型',order: 3,view: 'list', type: 'string',dictCode: 'dict_company_type',},
  industryType: {title: '行业类型',order: 4,view: 'list', type: 'string',dictCode: 'dict_industry_type',},
  creditCode: {title: '社会信用代码',order: 5,view: 'text', type: 'string',},
  district: {title: '地区',order: 6,view: 'pca', type: 'string',},
  registerCapital: {title: '注册资本',order: 7,view: 'number', type: 'number',},
  establishDate: {title: '成立时间',order: 8,view: 'date', type: 'string',},
  startTerm: {title: '开始日期',order: 9,view: 'date', type: 'string',},
  endTerm: {title: '结束日期',order: 10,view: 'date', type: 'string',},
  registrationAuthority: {title: '登记机关',order: 11,view: 'text', type: 'string',},
  address: {title: '经营地址',order: 12,view: 'text', type: 'string',},
  businessScope: {title: '经营范围',order: 13,view: 'textarea', type: 'string',},
  businessExpertise: {title: '主营业务',order: 14,view: 'textarea', type: 'string',},
  status: {title: '认证状态',order: 18,view: 'number', type: 'number',dictCode: 'dict_company_status',},
  appUserId: {title: '移动用户',order: 19,view: 'text', type: 'string',},
};
